package com.googlecode.dgwt.rebind.base;

import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.user.rebind.SourceWriter;

public class DoubleSourceWriter implements SourceWriter {

    private SourceWriter writer;
    private SourceWriter writer2;
    
    
    public DoubleSourceWriter(SourceWriter writer, SourceWriter writer2) {
        this.writer = writer;
        this.writer2 = writer2;
    }
    
    
    @Override
    public void beginJavaDocComment() {
        writer.beginJavaDocComment();
        writer2.beginJavaDocComment();
    }

    @Override
    public void commit(TreeLogger logger) {
        writer.commit(logger);
        writer2.commit(logger);
    }

    @Override
    public void endJavaDocComment() {
        writer.endJavaDocComment();
        writer2.endJavaDocComment();
    }

    @Override
    public void indent() {
        writer.indent();
        writer2.indent();
    }

    @Override
    public void indentln(String s) {
        writer.indentln(s);
        writer2.indentln(s);
    }

    @Override
    public void outdent() {
        writer.outdent();
        writer2.outdent();
    }

    @Override
    public void print(String s) {
        writer.print(s);
        writer2.print(s);
    }

    @Override
    public void println() {
        writer.println();
        writer2.println();
    }

    @Override
    public void println(String s) {
        writer.println(s);
        writer2.println(s);
    }

}
